﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace TXTD.Admin.Data.Entitys.System
{
    /// <summary>
    /// 字典项值
    /// </summary>
    [Table("SYS_DICTIONARY_ITEMS")]
    public class SysDictionaryItems : BaseEntity
    {
        /// <summary>
        /// 主键
        /// </summary>
        [Key]
        [Column("DICTIONARY_ITEM_ID")]
        [MaxLength(32)]
        public string DictionaryItemId { get; set; } = Guid.NewGuid().ToString("N");

        /// <summary>
        /// 字典id
        /// </summary>
        [Column("DICTIONARY_ID")]
        [MaxLength(32)]
        public string DictionaryId { get; set; }

        /// <summary>
        /// 字典键Code (保存到数据库)
        /// </summary>
        [Column("ITEM_KEY_CODE")]
        [MaxLength(200)]
        public string ItemKeyCode { get; set; }

        /// <summary>
        /// 字典键名称
        /// </summary>
        [Column("ITEM_KEY_NAME")]
        [MaxLength(200)]
        public string ItemKeyName { get; set; }

        /// <summary>
        /// 字典键描述
        /// </summary>
        [Column("ITEM_KEY_DESCRIBE")]
        [MaxLength(500)]
        public string ItemKeyDescribe { get; set; }

        /// <summary>
        /// 是否启用
        /// </summary>
        [Column("ENABLED")]
        public bool Enabled { get; set; } = true;

        /// <summary>
        /// 排序
        /// </summary>
        [Column("ITEM_SORT")]
        public int ItemSort { get; set; }

        #region 外键
        /// <summary>
        /// 字典
        /// </summary>
        public SysDictionary SysDictionary { get; set; }
        #endregion
    }
}
